package co2.bean;

import java.util.ArrayList;
import java.util.List;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

import co2.pojos.Question;

@ManagedBean
@ViewScoped
public class QuestionBean {

	private List<Question> list;
	private String test;
	
	public QuestionBean(){
		list = new ArrayList<Question>();
		list.add(new Question("asdf", "jan", "ch", "oooo", "kkk"));
		list.add(new Question("apa si?", "eeee", "mb", "uuuh", "yaa"));
		list.add(new Question("Test Cok", "sak", "karep", "mu", "dewe"));
		
	}

	public void submit(){
		for(Question q:list){
			System.out.println(q.getSoal()+"================>"+q.getJwb());
		}
	}
	public List<Question> getList() {
		return list;
	}

	public void setList(List<Question> list) {
		this.list = list;
	}

	public String getTest() {
		return test;
	}

	public void setTest(String test) {
		this.test = test;
	}
}
